<!-- FileCard.vue -->
<template>
  <div class="file-card">
    <!-- 头部区域 -->
    <div class="header">
      <div class="creator-info">
        <img :src="avatarUrl" alt="创建人头像" />
        <span>无畏的小博</span>
      </div>
      <div class="title">文件</div>
    </div>

    <!-- 内容区域 -->
    <div class="content">
      <div class="file-name">面试题汇总</div>
      <div class="file-description">我参加的二十场面试总结出的笔记</div>
      <div class="file-content">
        <!-- 使用 Element Plus 的 el-button 作为文件示例 -->
        <el-button type="primary">随机文件（请修改）</el-button>
      </div>
    </div>

    <!-- 底部区域 -->
    <div class="footer">
      <div class="tags">
        <el-tag type="info">面试笔记</el-tag>
      </div>
      <div class="actions">
        <el-icon><Star /></el-icon><span>1</span> <el-icon><ChatLineSquare /></el-icon
        ><span>2</span> <el-icon><Share /></el-icon><span>3</span>
      </div>
      <div class="expand-button">
        <el-icon><ArrowDownBold /></el-icon>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { ElTag, ElButton } from 'element-plus'
import 'element-plus/dist/index.css'

const avatarUrl = ref('https://placekitten.com/50/50') // 头像URL
</script>

<style scoped>
.file-card {
  background-color: rgba(153, 204, 255, 0.9); /* 调整透明度 */
  border-radius: 10px;
  width: 500px;
  padding: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header,
.content,
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.creator-info {
  display: flex;
  align-items: center;
}

.creator-info img {
  width: 20px; /* 减小大小 */
  height: 20px; /* 减小大小 */
  border-radius: 50%;
  margin-right: 8px;
}

.creator-info span,
.title {
  font-size: 12px; /* 减小字体大小 */
}

.content {
  flex-direction: column;
  flex: 1; /* 新增：使内容区域更大 */
}

.file-name,
.file-description {
  font-size: 16px; /* 增大字体大小 */
}

.title {
  font-weight: 600;
  color: #336699;
}

.file-content {
  margin-top: 15px; /* 增大上边距 */
}

.footer {
  justify-content: space-between;
  align-items: center;
}

.tags {
  display: flex;
  gap: 10px;
}

.actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.actions span {
  font-size: 12px; /* 减小字体大小 */
}
</style>
